package com.ybb.vue.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ybb
 * @version 1.0
 * @Description 物资入库类型枚举类
 * @Date 2023/3/11 19:20
 */

@Getter
@AllArgsConstructor
public enum GoodsInStatusEnum {
    WAIT_APPROVAL("0","待审核"),
    NO_IN("1","已入库"),
    YES_IN("2","入库驳回"),
    DEFAULT_CODE_WARM("-1","错误的入库类型")
    ;
    private String status;

    private String statusDesc;

    public static String getGoodsInStatus(String code){
        for (GoodsInStatusEnum it : GoodsInStatusEnum.values()) {
            if (it.status.equals(code)) {
                return it.statusDesc;
            }
        }
        return DEFAULT_CODE_WARM.statusDesc;
    }
}
